//--------------------------------------------------//
// Here we build up the Static/Dynamic spawn system //
//--------------------------------------------------//
public OldSpawnSystem(Handle:convar, const String:oldValue[], const String:newValue[])
{
	new index = -1

	if (StringToInt(newValue) != 1 && !CheckMapEnd)
	{
		while ((index = FindEntityByClassname2(index, "info_global_settings")) != -1)
		{
			RemoveEdict(index)
			PrintToServer("[SM] Static Spawn OFF")

			if (Debug)
				PrintToServer("IsVehicleMap 0")
		}
	}
	else if (StringToInt(newValue) == 1)
	{
		while ((index = FindEntityByClassname2(index, "info_global_settings")) != -1)
			RemoveEdict(index)
		
		new ent = CreateEntityByName("info_global_settings")
		DispatchSpawn(ent)
		
		while ((index = FindEntityByClassname2(index, "info_global_settings")) != -1)
		{
			DispatchKeyValue(index, "IsVehicleMap", "1")
			PrintToServer("[SM] Static Spawn ON")
			
			if (Debug)
				PrintToServer("IsVehicleMap 1")
		}
	}
}